package com.adkfp.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.adkfp.bean.ADKNetGroupBean;
import com.adkfp.dao.ADKNetGroupDaoMapper;
import com.adkfp.service.IADKNetGroupService;

/**
 * class name:ADKNetGroupService实现类 <BR>
 * class description: ADKNetGroup表的增删改查 <BR>
 * Remark: <BR>
 * @version 1.00 2019年01月03日
 * @author JACK)jackwei
 */
@Service("aDKNetGroupService")
public class ADKNetGroupServiceImpl implements IADKNetGroupService {
	@Resource
	private ADKNetGroupDaoMapper aDKNetGroupMapper;

	/**
	 * @Override
	 * Method name: insert <BR>
	 * Description: 插入一条记录 -黄嘉颖<BR>
	 * Remark: <BR>
	 * @param bean  <BR>
	*/
	@Override
	@Transactional
	public void insert(ADKNetGroupBean bean) {
		aDKNetGroupMapper.insert(bean);
	}

	/**
	 * @Override
	 * Method name: delete <BR>
	 * Description: 删除一条记录 <BR>
	 * Remark: <BR>
	 * @param id  <BR>
	*/
	@Override
	@Transactional
	public void delete(Integer id) {
		aDKNetGroupMapper.delete(id);
	}

	/**
	 * @Override
	 * Method name: update <BR>
	 * Description: 更新一条记录 <BR>
	 * Remark: <BR>
	 * @param bean  <BR>
	*/
	@Override
	@Transactional
	public void update(ADKNetGroupBean bean) {
		aDKNetGroupMapper.update(bean);
	}

	/**
	 * @Override
	 * Method name: findById <BR>
	 * Description: 根据id获取一条记录 <BR>
	 * Remark: <BR>
	 * @param id
	 * @return  <BR>
	*/
	@Override
	public ADKNetGroupBean findById(Integer id) {
		return aDKNetGroupMapper.findById(id);
	}

	/**
	 * @Override
	 * Method name: findByCondition <BR>
	 * Description: 根据bean里面的条件(判空)查询所有记录 <BR>
	 * Remark: <BR>
	 * @param bean
	 * @return  <BR>
	*/
	@Override
	@Transactional
	public List<ADKNetGroupBean> findByCondition(ADKNetGroupBean bean) {
		return aDKNetGroupMapper.findByCondition(bean);
	}

	/**
	 * @Override
	 * Method name: findByConditionCount <BR>
	 * Description: 根据bean里面的条件(判空)查询所有记录条数 <BR>
	 * Remark: <BR>
	 * @param bean
	 * @return  <BR>
	*/
	@Override
	
	public long findByConditionCount(ADKNetGroupBean bean) {
		return aDKNetGroupMapper.findByConditionCount(bean);
	}

	//查找组织机构名称
	@Override
	@Transactional
	public List<ADKNetGroupBean> selectNetGroupName() {
		return aDKNetGroupMapper.selectNetGroupName();
	}

	//验证名称唯一(FMY)
	@Override
	public long checkSname(ADKNetGroupBean bean) {
		return aDKNetGroupMapper.checkSname(bean);
	}
}